<%@ page language="java" import="java.util.*,com.beans.*,com.dao.*" pageEncoding="UTF-8"%> 
<%
String path = request.getContextPath();  
String basePath = request.getScheme()+"://"+request.getServerName()+":"+request.getServerPort()+path+"/";
             
%>
<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c"%>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"> 
<html>
  <head>
    <base href="<%=basePath%>"> 
    
    <title>My JSP 'index.jsp' starting page</title>
      <link rel="stylesheet" type="text/css" href="css/maintable.css" ></link>
    <link rel="stylesheet" type="text/css" href="css/edittable.css"  ></link>  
		<link rel="stylesheet" type="text/css" href="css/validate.css"  ></link>  
		<script type="text/javascript"  src="js/jquery-1.8.0.js"></script>
    <script>
   $(function(){
	   $(".form_btn").hover(function(){
			$(this).css("color","red").css("background","#6FB2DB");
		},
		
		function(){
			$(this).css("color","#295568").css("background","#BAD9E3");
		});	
	   $(".txtbox").attr("readonly","readonly").css("color","red");
   });
   </script>
	<meta http-equiv="pragma" content="no-cache">
	<meta http-equiv="cache-control" content="no-cache">
	<meta http-equiv="expires" content="0">    
	
	
	<meta http-equiv="keywords" content="keyword1,keyword2,keyword3">
	
	<meta http-equiv="description" content="This is my page">
	<!--
	<link rel="stylesheet" type="text/css" href="styles.css">
	-->
  </head>
  
  <body>
     <div class ="div_title">
		 <div class="div_titlename"> <img src="images/san_jiao.gif" ><span>订单商品列表</span></div>
	 </div>
	 
	 

				 	
				 <table class="main_table" >
				       <tr>
				 		<th width="40%">商品名称</th> 	<th width="19%">单位</th>	<th width="19%">单价</th>  <th width="19%">购买数量</th> 	
				 		</tr>
				 		<%
				 		OrderDao dao=new OrderDao();
				 		List<OrderGoods> orderGoodsList =dao.getOrderGoodsList(Integer.parseInt(request.getParameter("id")));
		 				request.setAttribute("orderGoodsList", orderGoodsList);
		 				%>	 
				 				<c:forEach var="orderGoods" items="${orderGoodsList }">
				 		<tr>
				 				<td>${orderGoods.goodsName}</td>	
				 				<td>${orderGoods.unit }</td>
				 				<td>${orderGoods.price }元</td>
				 				<td>${orderGoods.saleCount}</td>
				 		</tr>
				 		</c:forEach>
				</table>
				 <div class ="div_title">
				<div class="div_titlename"> <img src="images/san_jiao.gif" ><span>订单详情列表</span></div>
				</div>
				<%
				OrderInfo orderInfo =dao.getOrderInfoById(Integer.parseInt(request.getParameter("id")));
		 		request.setAttribute("orderInfo", orderInfo);
		 		%>	
		 		 <table  class="edit_table" >
		 		<tr>
		 			 	<td  class="td_info">订单号:</td>	
		 			 	<td  class="td_input_short"> <input type="text" class="txtbox" id="goodsName" name="goodsName" value="${orderInfo.orderNo}"/> </td>   
		 			 	<td  class="td_info">邮费:</td>	
		 			 	<td  class="td_input_short"> <input type="text" class="txtbox" id="goodsName" name="goodsName" value="${orderInfo.postage}"/> </td>    
		 		</tr>
		 		<tr>
		 			 	<td  class="td_info">付款方式:</td>	
		 			 	<td  class="td_input_short"> <input type="text" class="txtbox" id="goodsName" name="goodsName" value="${orderInfo.postage}"/> </td>   
		 			 	<td  class="td_info">邮寄方式:</td>	
		 			 	<td  class="td_input_short"> <input type="text" class="txtbox" id="goodsName" name="goodsName" value="${orderInfo.postMethod}"/> </td>    
		 		</tr>
		 		<tr>
		 			 	<td  class="td_info">下单日期:</td>	
		 			 	<td  class="td_input_short"> <input type="text" class="txtbox" id="goodsName" name="goodsName" value="${orderInfo.orderDate}"/> </td>   
		 			 	<td  class="td_info">邮寄地址:</td>	
		 			 	<td  class="td_input_short"> <input type="text" class="txtbox" id="goodsName" name="goodsName" value="${orderInfo.address}"/> </td>    
		 		</tr>
		 		<tr>
		 			 	<td  class="td_info">订单状态:</td>	
		 			 	<td  class="td_input_short"> <input type="text" class="txtbox" id="goodsName" name="goodsName" value="${orderInfo.orderState}"/> </td>   
		 			 	<td  class="td_info">发货日期:</td>	
		 			 	<td  class="td_input_short"> <input type="text" class="txtbox" id="goodsName" name="goodsName" value="${orderInfo.sendDate}"/> </td>    
		 		</tr>
		 		<tr>
		 			 	<td  class="td_info">订单金额:</td>	
		 			 	<td  class="td_input_short" id="ip"> 
		 			 	<input type="text" class="txtbox" id="goodsName" name="goodsName" value="${orderInfo.amount}"/></td>   
		 			 	<td  class="td_info">会员ID:</td>	
		 			 	<td  class="td_input_short"> <input type="text" class="txtbox" id="goodsName" name="goodsName" value="${orderInfo.memberNo}"/> </td>    
		 		</tr>
		 		<tr>
		 		<td  class="td_info"></td>	
		 		<td>
		 		<input type="reset" class="form_btn" value="返回" onclick="Javascript:history.go(-1);" />
		 		</td>
		 		</tr>
		 			
		</table>
  </body>
</html>